import { defineComponent } from "vue";
import styles from './styles.module.css';
import { useSession } from "@/stores/sesstion";


export default defineComponent({
    setup(_props, _ctx) {
        const session = useSession();
        return () => {

            return (

                <div class={["container app-wrap app-wrap-column app-wrap-center app-wrap-vertical", styles.app]}>
                    <div class={styles.text}>新版本已发布，请前往下载</div>
                    <div class={styles.progress}>
                        下载地址: {decodeURIComponent(session.downUrl)}
                    </div>
                    <div class="app-divider-10"></div>
                    <div>
                        <el-button onClick={() => {
                            window.api.shell.openExternal(session.downUrl);
                        }}>立即前往下载</el-button>
                    </div>
                </div >
            );
        }
    },
});


